<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<!-- Use method="xml" to create xml header implicitly -->
	<xsl:output method="html" indent="yes" encoding="utf-8" />


	<xsl:template match="/">
	
		<output>
			<scalar>
				<integer><xsl:value-of select="/data/scalar.integer" /></integer>
				<float><xsl:value-of select="/data/scalar.float" /></float>
				<string><xsl:value-of select="/data/scalar.string" /></string>
			</scalar>
			<structure>
				<array>
					<xsl:for-each select="/data/structure.array">
						<xsl:element name="{name()}">
							<xsl:value-of select="." />
						</xsl:element>
					</xsl:for-each>
				</array>
				<object>
					<xsl:for-each select="/data/structure.object/*">
						<xsl:element name="{name()}">
							<xsl:value-of select="." />
						</xsl:element>
					</xsl:for-each>
				</object>
			</structure>
		</output>
	
	</xsl:template>


</xsl:stylesheet>
